import torch
import onnx
from onnx import shape_inference
import onnxruntime

model = onnx.load("mobilenetv2-1.0.onnx")
onnx_model = shape_inference.infer_shapes(model)
print("onnx_model layer show:")

for tensor in onnx_model.graph.value_info:
    print(f"tensor.name:{tensor.name}")
    print(f"tensor shape:{tensor.type.tensor_type.shape}")